/*
 * Copyright (c) 2009 by ZDO Corporation.
 * Author: A. Onur Cinar
 * 
 * http://code.google.com/p/zdo-struts2
 * http://www.zdo.com
 * 
 * This file is part of ZDO Struts 2 Applications.
 *
 * ZDO-Struts2 is free software: you can redistribute it and/or
 * modify it under the terms of  the GNU General Public License
 * as published by the Free Software Foundation, either version
 * 3 of the License, or any later version.
 *
 * ZDO-Struts2 is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY  or  FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 */

package com.zdo.views.freemarker.tags;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.freemarker.tags.TagModel;

import com.opensymphony.xwork2.util.ValueStack;
import com.zdo.components.PaginationComponent;

/**
 * Pagination model. Encapsulates {@link PaginationComponent}
 * as a FreeMarker model.
 */
public class PaginationModel extends TagModel
{
	/**
	 * Constructor.
	 * 
	 * @param stack value stack.
	 * @param req servlet request.
	 * @param res servlet response.
	 */
	public PaginationModel (ValueStack stack, HttpServletRequest req,
			HttpServletResponse res)
	{
		super(stack, req, res);
	}

	/**
	 * Gets a new pagination component instance.
	 * 
	 * @return pagination component.
	 */
	@Override
	protected Component getBean ()
	{
		return new PaginationComponent(stack, req, res);
	}
}
